#include <iostream>
#include <math.h>
using namespace std;

signed main()
{
    double m,x,y;
    cin>>m>>x>>y;
    double jia = 0,yi,bing;
    for(int i=10;i<100;i++){
        double t = i/10+i%10*10;
        if(fabs(i-t)/x==t/y){
            jia = i;
            yi = t;
            bing = yi/y;
        }
    }
    if(jia){
        cout<<int(jia)<<" ";
        if(m==jia)    cout<<"Ping ";
        else if(m>jia)    cout<<"Gai ";
        else    cout<<"Cong ";
        if(m==yi)    cout<<"Ping ";
        else if(m>yi)    cout<<"Gai ";
        else    cout<<"Cong ";
        if(m==bing)    cout<<"Ping\n";
        else if(m>bing)    cout<<"Gai\n";
        else    cout<<"Cong\n";
    }
    else    cout<<"No Solution\n";
    return 0;
}
